{{include file="header_inc.html"}}
<body>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">

			<a href='/setting/adminmanage/'><em>管理员管理</em></a><span>|</span><a
				href='javascript:;' class="on"><em>添加管理员</em></a>
		</div>
	</div>
	<div class="pad_10">
		<div class="common-form">
			<form name="myform" action="/setting/adminmanage/add/" method="post"
				id="myform">
				<table width="100%" class="table_form contentWrap">
					<tr>
						<td width="80">用户名</td>

						<td><input type="test" name="info[username]"
							class="input-text" id="username"></input></td>
					</tr>
					<tr>
						<td>密码</td>
						<td><input type="password" name="info[password]"
							class="input-text" id="password" value=""></input></td>
					</tr>
					<tr>
						<td>确认密码</td>
						<td><input type="password" name="info[pwdconfirm]"
							class="input-text" id="pwdconfirm" value=""></input></td>
					</tr>
					<tr>
						<td>E-mail</td>
						<td><input type="text" name="info[email]" value=""
							class="input-text" id="email" size="30"></input></td>
					</tr>
					<tr>
						<td>真实姓名</td>
						<td><input type="text" name="info[realname]" value=""
							class="input-text" id="realname"></input></td>
					</tr>
					<tr>
						<td>所属角色</td>
						<td><select name="info[roleid]"> {{foreach
								item=content from=$Admin_Role_Info}}
								<option value="{{$content.roleid}}"
									{{if $content.roleid==$Admin_Info.roleid}}selected{{/if}}>{{$content.rolename}}</option>
								{{/foreach}}
						</select></td>
					</tr>
				</table>
				<div class="bk15"></div>
				<input name="dosubmit" type="submit" value="提交" class="button">
			</form>

		</div>
	</div>
</body>
<script type="text/javascript">
<!--
	$(function() {
		$.formValidator.initConfig({
			autotip : true,
			formid : "myform",
			onerror : function(msg) {
			}
		});
		$("#username").formValidator({
			onshow : "请输入用户名",
			onfocus : "用户名应该为2-20位之间"
		}).inputValidator({
			min : 2,
			max : 20,
			onerror : "用户名应该为2-20位之间"
		}).ajaxValidator({
			type : "get",
			url : "/ajax/checkname/",
			data : "",
			datatype : "html",
			async : 'false',
			success : function(data) {
				if (data == "1") {
					return true;
				} else {
					return false;
				}
			},
			buttons : $("#dosubmit"),
			onerror : "用户已存在。",
			onwait : "请稍候..."
		});
		$("#password").formValidator({
			onshow : "请输入密码",
			onfocus : "密码应该为6-20位之间"
		}).inputValidator({
			min : 6,
			max : 20,
			onerror : "密码应该为6-20位之间"
		});
		$("#pwdconfirm").formValidator({
			onshow : "请输入确认密码",
			onfocus : "请输入两次密码不同。",
			oncorrect : "密码输入一致"
		}).compareValidator({
			desid : "password",
			operateor : "=",
			onerror : "请输入两次密码不同。"
		});
		$("#email").formValidator({
			onshow : "请输入E-mail",
			onfocus : "E-mail格式错误",
			oncorrect : "E-mail格式正确"
		}).regexValidator({
			regexp : "email",
			datatype : "enum",
			onerror : "E-mail格式错误"
		});
	})
//-->
</script>
{{include file="footer.html"}}
